package com.ruoyi.web.convert.alarm;

import com.ruoyi.alarmmanagement.domain.DmWarn;
import com.ruoyi.web.entity.Alarm;
import org.apache.ibatis.annotations.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface AlarmConvert {
    AlarmConvert INSTANCE = Mappers.getMapper(AlarmConvert.class);

    @Mappings({@Mapping(source = "ID",target = "Id"),@Mapping(source = "WarnType",target = "AlarmTypeId")
              ,@Mapping(source = "RecentlyWartTime",target = "AddDate")})
    Alarm convert(DmWarn warn);
}
